<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">

<h:head></h:head>
<body>

	<h:form>

		<p:calendar></p:calendar>

		<h:dataTable value="#{projetoBean.projetos}" var="projeto"
			id="dtProjeto" border="1">
			<h:column>
				<f:facet name="header">ID</f:facet>
				<h:outputText value="#{projeto.id}" />
			</h:column>
			<h:column>
				<f:facet name="header">Nome do Projeto</f:facet>
				<h:outputText value="#{projeto.nomeProjeto}" />
			</h:column>
			<h:column>
				<f:facet name="header">#</f:facet>
				<h:commandLink value="Alterar" action="#{projetoBean.update}">
					<f:setPropertyActionListener target="#{projetoBean.projeto}"
						value="#{projeto}" />
				</h:commandLink>
			</h:column>
			<h:column>
				<f:facet name="header">#</f:facet>
				<h:commandLink id="lnkDelete" value="Excluir"
					onclick="if (!confirm(Tem certeza que deseja excluir este dado?)) return false"
					action="#{projetoBean.delete}">
					<f:setPropertyActionListener target="#{projetoBean.projeto}"
						value="#{projeto}" />
				</h:commandLink>
			</h:column>
		</h:dataTable>

	</h:form>


</body>
</html>
